On successful completion, this routine returns the mutex type in
the location specified by the type argument.
If an error condition occurs, this routine returns an integer
value indicating the type of the error. Possible return values
are as follows:
Return Description
0 Successful completion.
[EINVAL] The value specified by attr is not a valid mutex
attributes object.